#include <gtest/gtest.h>  // googletest header file

#include "person.h"

TEST(Person, should_create_a_person_when_use_new_person_function)
{
    Persons_Init();
    int age = 18;
    char name[MAX_NAME_LENGTH] = "zhangsan";
    
    
    uint8_t id = Person_Create(age, name);
    Person zhangsan;
    GetPerson(id, &zhangsan);
    ASSERT_EQ(zhangsan.age, 18);
    ASSERT_STREQ(zhangsan.name, "zhangsan");

    char introduce[MAX_INTRODUCE_LENGTH];

    Person_Introduce(id, introduce);
    ASSERT_STREQ(introduce, "My name is zhangsan. I am 18 years old.");

}